package t327.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import t327.mapper.FeeMapper;
import t327.mapper.QuotationListMapper;
import t327.mapper.QuotationMapper;
import t327.pojo.Fee;
import t327.pojo.QuotationList;
import t327.pojo.StyleNumber;
import t327.pojo.VerifyPrice;
import t327.service.iter.IQuotationService;

import java.util.List;

@Service
@Transactional
public class QuotationServiceImpl implements IQuotationService {
    @Autowired
    QuotationMapper quotationMapper;

    @Autowired
    QuotationListMapper quotationListMapper;

    @Autowired
    FeeMapper feeMapper;
    @Override
    public int quotationAdd(VerifyPrice verifyPrice) {
        return quotationMapper.quotationAdd(verifyPrice);
    }

    @Override
    public int feeAdd(Fee fee) {
        return feeMapper.feeAdd(fee);
    }

    @Override
    public List<QuotationList> getAllQuotationList() {
        return quotationListMapper.getAllQuotationList();
    }

    @Override
    public List<StyleNumber> getAllStyleNumber() {
        return quotationMapper.getAllStyleNumber();
    }

    @Override
    public List<StyleNumber> getBrandByStyleNumber(Long styleNumberId) {
        return quotationMapper.getBrandByStyleNumber(styleNumberId);
    }

    @Override
    public int getFeeStyleNumber(Long styleNumberId,Long feedId) {
        return quotationMapper.getFeeStyleNumber(styleNumberId,feedId);
    }

    @Override
    public List<QuotationList> getQuotationListByCond(String cc) {
        return quotationListMapper.getQuotationListByCond(cc);
    }

    @Override
    public int changeAuditStatus(Long styleNumberId) {
        return quotationMapper.changeAuditStatus(styleNumberId);
    }

    @Override
    public int updateAddStatusInStyleNumber(Long styleNumberId) {
        return quotationMapper.updateAddStatusInStyleNumber(styleNumberId);
    }
}
